#pragma once
#include "stdafx.h"
#include "Handler.h"
#include <winsock.h>

using namespace std;

typedef enum Event_Type{
	NOT_DEFINED = 0,
	READ_EVENT = 1,
	ACCEPT_EVENT = 2,
	CONNECT_EVENT = 2,
	WRITE_EVENT = 3,
	TIMEOUT_EVENT = 4,
	INIT_EVENT = 5
}Event_Type;

typedef enum Mode{
	SERVER = 0,
	CLIENT = 1
}Mode;

template <typename T>
class IEventHandler
{
public:
	virtual void handle_event(Handler<T> handle, Event_Type et) = 0;

	Handler<T> get_handle() const
	{
		return handle;
	}

protected:
	Handler<T> handle;
};